package interrupt.join;

public class Parent extends Thread{

    @Override
    public void run(){
        System.out.println("Parent start");
        Child child = new Child();
        child.start();
        try {
            child.join();
        } catch (InterruptedException e) {
            System.out.println("Parent throw InterruptedException: " + Thread.currentThread().isInterrupted());
        } finally {
            System.out.println("Parent end");
        }
    }
}
